const BaseHandler = require('../base-handler');
const SystemServices = require('../../../constants').SystemServices;
const HTTP_VERBS = require('../../../constants').HTTP_VERBS;

class CommunityApplicationHandler extends BaseHandler {

    get pattern() {
        return "/wall/:wall_id/app.js";
    }

    doGET(request, response) {
        this.Controller.getLocaleResources(request, 'community', (resources) => {
            response.render('common/wall-app', {
                locale: request.locale,
                locales: resources
            });
        });
    }

    setup() {
        this.registerVerb(HTTP_VERBS.GET, this.doGET);
    }
}

module.exports = CommunityApplicationHandler;